package com.xuecheng.learning.feign;

import com.xuecheng.commons.model.dto.RecordDto;
import com.xuecheng.commons.model.vo.ResponseResult;
import com.xuecheng.learning.service.CourseRecordService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 选课记录前端控制器
 * </p>
 *
 * @author itheima
 */
@Slf4j
@RestController
@RequestMapping
public class FeignCourseRecordController {

    @Autowired
    private CourseRecordService courseRecordService;

    //保存或者修改请求路径
    @PostMapping("courseRecord/saveRecord")
    public ResponseResult saveRecord (@RequestBody RecordDto dto) {
        return courseRecordService.saveRecord(dto);
    }
}
